1. Field of the Invention
The present invention relates to a line segment detection apparatus and a storage medium storing a control program. More particularly, the present invention relates to a line segment detection apparatus applicable to a cutting plotter having a function of detecting the reference mark of a cutting target medium, and a storage medium storing a control program.
2. Description of the Relevant Art
These days, a so-called cutting target medium driving (grid roller) cutting plotter and a flatbed cutting plotter are known as a cutting plotter that cuts a cutting target medium into a desired shape.
The grid roller cutting plotter includes driving rollers (grid rollers) and driven rollers (pinch rollers) that clamp the two end portions of a cutting target medium. The grid roller cutting plotter moves a cutting target medium in the first direction (X-axis direction) by rotating the driving rollers clockwise and counterclockwise. The grid roller cutting plotter further includes a pen block provided to be movable in the second direction (Y-axis direction) perpendicular to the first direction. A cutting pen attached to the pen block is moved in the second direction (Y-axis direction) while being selectively pressed against or separated from a cutting target medium. In this manner, the grid roller cutting plotter can cut a cutting target medium into a desired shape by moving the cutting pen in two-dimensional directions relatively to the cutting target medium.
The flatbed cutting plotter includes a flat plate-like table on which a cutting target medium is placed, a Y bar provided to be movable in the first direction with respect to the table, and a pen block provided to be movable in the second direction perpendicular to the first direction by sliding along the Y bar. The flatbed cutting plotter can cut a cutting target medium into a desired shape by controlling movement of the pen block with respect to the table, and selectively pressing a cutting pen provided in the pen block against the cutting target medium or separating it from the cutting target medium.
Note that the pen block is also called a “head”.
A reference mark called a “register mark” is formed in advance on a cutting target medium in order to specify a cuttable region of the cutting target medium. In many cases, the reference mark is constituted by a plurality of line segments, and reference marks are printed in advance at, e.g., the four corners of a cutting target medium.
Some cutting plotters include, in the head, a reflection photosensor (to be simply referred to as a “photosensor” hereinafter) having a light emitting element and a light receiving element, and have a function of automatically detecting a line segment constituting a register mark. The cutting plotter having this function of the line segment detection apparatus irradiates the surface of a cutting target medium with light from the light emitting element while moving the head. The light receiving element receives the light reflected by the surface. The cutting plotter determines whether a register mark is printed, based on the difference between the amount of light reflected by the surface of a portion at which the background color of the cutting target medium is exposed, and the amount of light reflected by the surface of the register mark (see, e.g., Japanese Patent Laid-Open No. 11-114886).
However, the following problems arise when the presence/absence of a register mark is determined based on only the difference between the amount of light reflected by the surface of a portion at which the background color of a cutting target medium is exposed, and the amount of light reflected by the surface of the register mark.
First, when a foreign substance such as a sticky substance is attached on a cutting target medium, the reflected light amount decreases owing to the foreign substance, and the foreign substance may be erroneously detected as a line segment constituting a register mark.
Also, when a cutting target medium 100 has a glossy laminate 102 adhered on a mount 101, as shown in FIG. 1, the surface undulates depending on the state of the cutting target medium 100, and light reflected by the surface of the laminate 102 does not enter the light receiving element, generating a portion at which the luminance level drops. This undulation moves in the moving direction of a photosensor 103 when, for example, a sensor hood 103a of the photosensor 103 moves in contact with the cutting target medium 100. In the case of the grid roller cutting plotter, the cutting target medium 100 tends to curl in the feed direction, and the undulation readily appears as a wrinkle parallel to the Y-axis direction.
At a portion at which the undulation occurs, reflected light does not return to the light receiving element of the sensor 103, and the reflected light amount to the light receiving element greatly decreases. As a result, the portion at which the undulation occurs may be erroneously detected as a line segment constituting a register mark.
Further, when part of the laminate 102 of the cutting target medium 100 is folded, as shown in FIG. 2, even if the folded portion is smoothed by the sensor hood 103a of the photosensor 103 moving together with the head, the folded portion still remains.
If the laminate 102 of the cutting target medium 100 has such a folded portion, most of light reflected by the folded portion does not return to the light receiving element. As a result, the reflected light amount detected by the light receiving element greatly decreases. The folded portion may be erroneously detected as a line segment constituting a register mark.